// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010  Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

#ifndef RE_MODULE_MESSAGES_H
#define RE_MODULE_MESSAGES_H


//-----------------------------------------------------------------------------
// includes
//-----------------------------------------------------------------------------

#include "nel/misc/sstring.h"
#include "gus_net_types.h"


//-----------------------------------------------------------------------------
// class CMsgRERequestFile
//-----------------------------------------------------------------------------

class CMsgRERequestFile
{
public:
	const char* getName() const { return "RE_REQUEST"; }

	CMsgRERequestFile()
	{
	}
	
	CMsgRERequestFile(GUSNET::TRawMsgBodyPtr msgBody)
	{
		msgBody->serial(*this);
	}

	CMsgRERequestFile(const NLMISC::CSString& fileName)
	{
		_FileName= fileName;
	}

	void serial(NLMISC::IStream& stream)
	{
		stream.serial(_FileName);
	}

	const NLMISC::CSString& getFileName() const { return _FileName; }

private:
	NLMISC::CSString _FileName;
};


//-----------------------------------------------------------------------------
// class CMsgREFileDataAck
//-----------------------------------------------------------------------------

class CMsgREFileDataAck
{
public:
	const char* getName() const { return "RE_DATA_ACK"; }

	CMsgREFileDataAck()
	{
	}
	
	CMsgREFileDataAck(GUSNET::TRawMsgBodyPtr msgBody)
	{
		msgBody->serial(*this);
	}

	CMsgREFileDataAck(const NLMISC::CSString& fileName,bool status)
	{
		_FileName= fileName;
		_Status= status;
	}

	void serial(NLMISC::IStream& stream)
	{
		stream.serial(_FileName);
		stream.serial(_Status);
	}

	const NLMISC::CSString& getFileName() const { return _FileName; }
	bool getStatus() const						{ return _Status; }

private:
	NLMISC::CSString _FileName;
	bool _Status;
};


//-----------------------------------------------------------------------------
// class CMsgREDuplicateModuleError
//-----------------------------------------------------------------------------

class CMsgREDuplicateModuleError
{
public:
	const char* getName() const { return "RE_ERR_DUPMOD"; }

	CMsgREDuplicateModuleError()
	{
	}
	
	CMsgREDuplicateModuleError(GUSNET::TRawMsgBodyPtr msgBody)
	{
	}

	void serial(NLMISC::IStream& stream)
	{
	}

private:
};


//-----------------------------------------------------------------------------
#endif
